home *** CD-ROM | disk | FTP | other *** search
- on buttonPressedUp nButton, CurrScreen
- global SoundActive, Navigate, Fade, CurrVideo, gTriviaQuestMem, Food, Choice, MyFavorites, forClear, RecipeNum, gProgrmPathOnHD, AfterFavorite
- set Navigate to 0
- set nButton to nButton - 41
- set buttonVec to ["sound", "main", "back", "help", "print", "quit", "favorites"]
- set buttonPressed to getAt(buttonVec, nButton)
- if nButton = 1 then
- if soundBusy(1) = 0 then
- if (CurrScreen = "enter") or (CurrScreen = "party") or (CurrScreen = "history") then
- set CurrScreen to "slides"
- else
- if (CurrScreen = "query") or (CurrScreen = "non-alco") or (CurrScreen = "spirits") then
- set CurrScreen to "drinks"
- else
- if CurrScreen = "hangover" then
- set CurrScreen to "hang"
- end if
- end if
- end if
- if CurrScreen = "objects" then
- nothing()
- else
- sound playFile 1, gProgrmPathOnHD & CurrScreen
- set SoundActive to 1
- end if
- else
- set SoundActive to 0
- sound stop 1
- end if
- else
- if nButton = 2 then
- set x to the number of lines in field "backField"
- put marker("main") into line x + 1 of field "backField"
- set Fade to 1
- clearPuppets()
- if soundBusy(1) then
- set SoundActive to 1
- end if
- go(marker("main"))
- else
- if nButton = 3 then
- set Navigate to EMPTY
- if marker(0) = marker("drinks") then
- set Fade to 1
- end if
- if the number of lines in field "backField" > 1 then
- cursor(4)
- set x to the number of lines in field "backField"
- if the number of items in line x of field "backField" = 1 then
- set prevMark to the value of line x of field "backField"
- else
- if item 2 of line x of field "backField" = "objects" then
- set prevMark to the value of item 1 of line x of field "backField"
- set Choice to item 3 of line x of field "backField"
- set RecipeNum to value(item 4 of line x of field "backField")
- end if
- end if
- delete line x of field "backField"
- clearPuppets()
- go(prevMark)
- end if
- else
- if nButton = 4 then
- set x to the frame
- if (x > 85) and (x < 122) then
- set x to "spirits"
- else
- if x = 583 then
- set x to "11"
- else
- if ((x > 125) and (x < 182)) or (x = 191) or (x = 196) then
- if (CurrVideo <> " ") and (CurrVideo <> EMPTY) then
- set x to "VidS"
- else
- set x to "NoVidS"
- end if
- else
- set x to the frame & EMPTY
- end if
- end if
- end if
- if soundBusy(2) = 0 then
- puppetSound(2, member x of castLib "help")
- else
- puppetSound(2, 0)
- end if
- else
- if nButton = 5 then
- set the text of field "maxfield" to EMPTY
- if CurrScreen = "history" then
- put "History" & RETURN into field "PrintTitle"
- put the number of member "PrintTitle" into line 1 of field "MaxField"
- put the number of member "hist3" into line 2 of field "MaxField"
- put the number of member "MaxSpace2" into line 3 of field "MaxField"
- put the number of member "hist2" into line 4 of field "MaxField"
- put the number of member "MaxSpace2" into line 5 of field "MaxField"
- put the number of member "hist1" into line 6 of field "MaxField"
- maxprint("text")
- else
- if CurrScreen = "party" then
- put "World Party" & RETURN into field "PrintTitle"
- put the number of member "PrintTitle" into line 1 of field "MaxField"
- repeat with i = 1 to 12
- put the number of member ("month" & i) into line i * 2 of field "MaxField"
- put the number of member "MaxSpace2" into line (i * 2) + 1 of field "MaxField"
- end repeat
- maxprint("text")
- else
- if CurrScreen = "hangOver" then
- put "Hangover" & RETURN into field "PrintTitle"
- put the number of member "PrintTitle" into line 1 of field "MaxField"
- put the number of member "hangt3" into line 2 of field "MaxField"
- put the number of member "MaxSpace2" into line 3 of field "MaxField"
- put the number of member "hangt2" into line 4 of field "MaxField"
- put the number of member "MaxSpace2" into line 5 of field "MaxField"
- put the number of member "hangt1" into line 6 of field "MaxField"
- maxprint("text")
- else
- if CurrScreen = "trivia" then
- if (the text of field "score" of castLib "TriviaEx.cst" = 10) and (the last char in gTriviaQuestMem = 1) then
- put the number of member "trivia base mat.1.board" into line 1 of field "MaxField"
- maxprint("text")
- end if
- else
- if char 1 to 6 of CurrScreen = (("spirit" & char 7 of CurrScreen) <> "s") then
- else
- if CurrScreen = "objects" then
- if the visible of sprite 31 then
- put "Notes" & RETURN into field "PrintTitle"
- put the number of member "PrintTitle" into line 1 of field "MaxField"
- put the number of member "currNotes" into line 2 of field "MaxField"
- maxprint("text")
- else
- if marker(0) = marker("foodP") then
- put the number of member ("toPrint" & Food) into line 1 of field "MaxField"
- maxprint("text")
- else
- put Choice into line 1 of field "MaxField"
- put the number of member RecipeNum of castLib "slideNW" into line 2 of field "Maxfield"
- put the number of member "MaxSpace" into line 3 of field "MaxField"
- put the number of member "MaxSpace" into line 4 of field "MaxField"
- put the text of member "tarInfo2" into field "TarInfo"
- put the number of member "tarInfo" into line 5 of field "MaxField"
- set x to the number of lines in the text of member ("recipe" & RecipeNum)
- put line x - 7 to x of the text of member ("recipe" & RecipeNum) into field "on the base"
- set y1 to offset("@", field "on the base")
- put " " into char y1 of field "on the base"
- set y2 to offset("@", field "on the base")
- put " " into char y2 of field "on the base"
- put the number of member "MaxSpace2" into line 6 of field "MaxField"
- put the number of member "on the base" into line 7 of field "MaxField"
- maxprint("tour")
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- else
- if nButton = 6 then
- windowRoutine()
- set shop1 to field "shop1"
- set shop2 to field "shop2"
- tell window "notes"
- set the text of field "shop1" to shop1
- end tell
- tell window "notes"
- set the text of field "shop2" to shop2
- end tell
- tell window "notes"
- saveMovie()
- end tell
- forget(window "notes")
- clearPuppets()
- quit()
- else
- if nButton = 7 then
- set MyFavorites to 1
- if (the frame > 123) and (the frame < 205) and forClear then
- windowRoutine()
- set x to field "currNotes"
- tell window "notes"
- set the text of field (RecipeNum + 50) to x
- end tell
- tell window "notes"
- saveMovie()
- end tell
- end if
- if the stageRight > 640 then
- set winRect to rect(318, 172, 716, 494)
- else
- set winRect to rect(238, 111, 634, 431)
- end if
- set the modal of window "favorite" to 1
- set the titleVisible of window "favorite" to 0
- set the windowType of window "favorite" to 3
- set the rect of window "favorite" to winRect
- set AfterFavorite to 1
- set the fileName of window "favorite" to gProgrmPathOnHD & "favorite.dir"
- open(window "favorite")
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on buttonPressedDown nButton, CurrScreen
- set bDown to the clickOn
- set nButton to nButton - 41
- set buttonVec to ["sound", "main", "back", "help", "print", "quit", "favorites"]
- set buttonPressed to getAt(buttonVec, nButton)
- if nButton = 1 then
- if soundBusy(1) = 1 then
- set the member of sprite 42 to member "soundDown"
- else
- set the member of sprite 42 to member "puppetOrigin"
- end if
- else
- set the member of sprite bDown to member (buttonPressed & "Down")
- updateStage()
- repeat while the mouseDown
- end repeat
- set the member of sprite bDown to member "puppetOrigin"
- end if
- end
-